package com.example.morealipy.adapter;

import android.support.v7.widget.GridLayoutManager;

/**
 * <pre>
 *     author : wangkui
 *     e-mail : wangkui20090909@sina.com
 *     time   : 2019/10/16 12:24
 *     desc   :
 *     version: 1.0
 * </pre>
 */
public class AdapterColSpanLookup extends GridLayoutManager.SpanSizeLookup{
    ApplyAdapter mApplyAdapter;
    public AdapterColSpanLookup(ApplyAdapter mApplyAdapter){
        this.mApplyAdapter = mApplyAdapter;
    }
    @Override
    public int getSpanSize(int position) {
        int type = mApplyAdapter.getItemViewType(position);
        switch (type){
            case 0:
                return 4;
             default:
                 return 1;
        }
    }
}
